import { post, get } from '@/http/axios'
export default {
  namespaced: true,
  state: {
    categoryData:[]
  },
  mutations: {
    SET_CATEGORY(state, data){
      state.categoryData = data
    }
  },
  actions: {
    // 获取所有栏目数据
    async getCategoryDataVuex({commit}, param){
      let res = await get('/productCategory/pageQuery', param)
      // console.log(res);
      commit('SET_CATEGORY', res.data.data.list)
    }
  }
}